package gepetto.command;

import java.util.TreeMap;

public abstract class Command implements Cloneable {
	protected String name = "Command";

	protected TreeMap<String, String> props = null;

	protected Command (String name) {
		this.name = name;
		props = new TreeMap<String, String> ();
	}
	
	protected abstract Command clone ();
	
	public boolean edit (String key, String value) {
		props.put(key, value);
		
		return true;
	}
	
	protected abstract boolean update();

	protected abstract boolean redo ();

	protected abstract boolean undo ();

	public String getName() {
		return name;
	}
}
